/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package idea.model.qnrlibrary;


import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;


/**
 *
 * @author rejun001
 */
@Entity
@Table( name = "common_parameters" )
@XmlRootElement
@NamedQueries( 
{
    @NamedQuery( name = "CommonParameters.findAll" , query = "SELECT c FROM CommonParameters c" ) ,
    @NamedQuery( name = "CommonParameters.findByParameterName" , query = "SELECT c FROM CommonParameters c WHERE c.parameterName = :parameterName" ) ,
    @NamedQuery( name = "CommonParameters.findByParameterValue" , query = "SELECT c FROM CommonParameters c WHERE c.parameterValue = :parameterValue" ) ,
    @NamedQuery( name = "CommonParameters.findByParamDescription" , query = "SELECT c FROM CommonParameters c WHERE c.paramDescription = :paramDescription" ) ,
    @NamedQuery( name = "CommonParameters.findByDateCreated" , query = "SELECT c FROM CommonParameters c WHERE c.dateCreated = :dateCreated" ) ,
    @NamedQuery( name = "CommonParameters.findByCreatedBy" , query = "SELECT c FROM CommonParameters c WHERE c.createdBy = :createdBy" ) ,
    @NamedQuery( name = "CommonParameters.findByDateModified" , query = "SELECT c FROM CommonParameters c WHERE c.dateModified = :dateModified" ) ,
    @NamedQuery( name = "CommonParameters.findByModifiedBy" , query = "SELECT c FROM CommonParameters c WHERE c.modifiedBy = :modifiedBy" ) ,
    @NamedQuery( name = "CommonParameters.findByDatabaseName" , query = "SELECT c FROM CommonParameters c WHERE c.databaseName = :databaseName" ) ,
    @NamedQuery( name = "CommonParameters.findByCommonParametersId" , query = "SELECT c FROM CommonParameters c WHERE c.commonParametersId = :commonParametersId" )
} )
public class CommonParameters implements Serializable
{
    private static final long serialVersionUID = 1L;
    @Basic( optional = false )
    @Column( name = "parameter_name" )
    private String parameterName;
    @Basic( optional = false )
    @Column( name = "parameter_value" )
    private String parameterValue;
    @Column( name = "param_description" )
    private String paramDescription;
    @Basic( optional = false )
    @Column( name = "date_created" )
    @Temporal( TemporalType.TIMESTAMP )
    private Date dateCreated;
    @Basic( optional = false )
    @Column( name = "created_by" )
    private String createdBy;
    @Column( name = "date_modified" )
    @Temporal( TemporalType.TIMESTAMP )
    private Date dateModified;
    @Column( name = "modified_by" )
    private String modifiedBy;
    @Basic( optional = false )
    @Column( name = "database_name" )
    private String databaseName;
    @Id
    @Basic( optional = false )
    @Column( name = "common_parameters_id" )
    private String commonParametersId;


    public CommonParameters()
    {
    }


    public CommonParameters( String commonParametersId )
    {
        this.commonParametersId = commonParametersId;
    }


    public CommonParameters( String commonParametersId , String parameterName , String parameterValue , Date dateCreated , String createdBy , String databaseName )
    {
        this.commonParametersId = commonParametersId;
        this.parameterName = parameterName;
        this.parameterValue = parameterValue;
        this.dateCreated = dateCreated;
        this.createdBy = createdBy;
        this.databaseName = databaseName;
    }


    public String getParameterName()
    {
        return parameterName;
    }


    public void setParameterName( String parameterName )
    {
        this.parameterName = parameterName;
    }


    public String getParameterValue()
    {
        return parameterValue;
    }


    public void setParameterValue( String parameterValue )
    {
        this.parameterValue = parameterValue;
    }


    public String getParamDescription()
    {
        return paramDescription;
    }


    public void setParamDescription( String paramDescription )
    {
        this.paramDescription = paramDescription;
    }


    public Date getDateCreated()
    {
        return dateCreated;
    }


    public void setDateCreated( Date dateCreated )
    {
        this.dateCreated = dateCreated;
    }


    public String getCreatedBy()
    {
        return createdBy;
    }


    public void setCreatedBy( String createdBy )
    {
        this.createdBy = createdBy;
    }


    public Date getDateModified()
    {
        return dateModified;
    }


    public void setDateModified( Date dateModified )
    {
        this.dateModified = dateModified;
    }


    public String getModifiedBy()
    {
        return modifiedBy;
    }


    public void setModifiedBy( String modifiedBy )
    {
        this.modifiedBy = modifiedBy;
    }


    public String getDatabaseName()
    {
        return databaseName;
    }


    public void setDatabaseName( String databaseName )
    {
        this.databaseName = databaseName;
    }


    public String getCommonParametersId()
    {
        return commonParametersId;
    }


    public void setCommonParametersId( String commonParametersId )
    {
        this.commonParametersId = commonParametersId;
    }


    @Override
    public int hashCode()
    {
        int hash = 0;
        hash += ( commonParametersId != null ? commonParametersId.hashCode() : 0 );
        return hash;
    }


    @Override
    public boolean equals( Object object )
    {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if ( !( object instanceof CommonParameters ) )
        {
            return false;
        }
        CommonParameters other = (CommonParameters) object;
        if ( ( this.commonParametersId == null && other.commonParametersId != null ) || ( this.commonParametersId != null && !this.commonParametersId.equals( other.commonParametersId ) ) )
        {
            return false;
        }
        return true;
    }


    @Override
    public String toString()
    {
        return "idea.model.qnrlibrary.CommonParameters[ commonParametersId=" + commonParametersId + " ]";
    }
    
}
